import request from "@/services/request.ts";
export const todoList = async ()=>{
    return request.get('/todo')
}
export const todoDetail = async (id:number)=>{
    return request.get(`/todo/${id}`)
}
export const todoCreate = async (data:object)=>{
    return request.post('/todo',data)
}
export const todoUpdate = async (id:number,data:object)=>{
    return request.put(`/todo/${id}`,data)
}
export const todoDelete = async (id:number)=>{
    return request.del(`/todo/${id}`)
}

/*
* 订单状态
* */
export const todoStatus = async ()=>{
    return request.get('/todo/status')
}
export const todoStatusCreate = async (data:object)=>{
    return request.post('/todo/status',data)
}
export const todoStatusUpdate = async (id:number,data:object)=>{
    return request.put(`/todo/status/${id}`,data)
}
export const todoStatusDelete = async (id:number)=>{
    return request.del(`/todo/status/${id}`)
}

//订单交付方式
export const todoPriority = async ()=>{
    return request.get('/todo/priority')
}
export const todoPriorityCreate = async (data:object)=>{
    return request.post('/todo/priority',data)
}
export const todoPriorityUpdate = async (id:number,data:object)=>{
    return request.put(`/todo/priority/${id}`,data)
}
export const todoPriorityDelete = async (id:number)=>{
    return request.del(`/todo/priority/${id}`)
}